

public class Main{
	public static void main(String[] args){

	//	System.out.println("thread A start");

		ThreadGroup threadGroup1=new ThreadGroup("g1"){
			public void uncaughtException(Thread t,Throwable e){
				System.out.println(t.getName()+":"+e.getMessage());
			}
		};

		Thread thread1=new Thread(threadGroup1,
			new Runnable(){
				public void run(){
					throw new RuntimeException("run fail");
				}
			}
		);		
		
		thread1.start();

	}

}